package com.aistar.line.controller;

import com.aistar.common.vo.Result;
import com.aistar.common.vo.StatusCode;
import com.aistar.line.service.IMyCenterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: java类作用描述:
 * @Author: tyg
 * @CreateDate: 2019/7/3 0003
 * @Version: 1.0
 */
@RestController
public class MyCenterController {
    @Autowired
    private IMyCenterService myCenterService;

    @GetMapping("/mycenter")
    public Result showCollect() {

        if (myCenterService.findByUid() != null) {
            return new Result(true, StatusCode.OK,"查询收藏商品成功",myCenterService.findByUid());
        } else {
            return new Result(true, StatusCode.ERROR,"查询收藏商品为空");
        }
     }
}
